<template>
    <div>
        <van-sticky>
            <van-nav-bar title='地址填写' left-arrow>
                <template #left>
                    <van-icon name="arrow-left" size="20" @click="$router.back()" style="margin-right:10px" />
                </template>
            </van-nav-bar>
        </van-sticky>
        <van-address-edit :area-list="areaList" show-postal show-delete show-set-default
            :area-columns-placeholder="['请选择', '请选择', '请选择']" @save="onSave" @delete="onDelete">

        </van-address-edit>
    </div>
</template>
<script>
    import { areaList } from '@vant/area-data';
    export default {
        name: 'AddressEdit',
        data() {
            return {
                areaList,
            };
        },
        methods: {
            onSave(address) {
                localStorage.setItem('address', JSON.stringify(address));
                this.$router.push('/order');
               

            },
            onDelete() {
                Toast('delete');
            },
        }
    }
</script>